list1=[]
s=0
for i in range(10):
    n=int(input(""))
    list1.append(n)
    s+=n
print(list1)



print((int(s)-max(list1)-min(list1))/8)

